function initData(callback){
	var typeList = new Array();
	for(var i =1;i<19;i++){
		var type = {name:'菜单一',};
		var dataList = new Array();
		for(var j = 1;j<15;j++){
			dataList.push({
				name:'二级'+i+':'+j,
			});
		}
		type.dataList = dataList;
		typeList.push(type);
	}
	callback(typeList);
}

function loadDataList(data,callback){
	var list = new Array();
	for(var i =1;i<19;i++){
		list.push({name:data.name+'：：：内容：：：'+i});
	}
	callback(data,list);
}


function loadIndexList(){
	var list = new Array();
	var indexData = $.getSession("indexData");			//通过session获取热播的数据
	
	if(indexData){
		try{
			eval("var indexObj = "+indexData);			//还原json对象
			var hotMovieList = indexObj.hotMovieList;		//获取热播电视的数据,这里根据需要修改
			if(hotMovieList && hotMovieList.length>0){
				var hotList = new Array();
				for(var i =0;i<hotMovieList.length;i++){
					if(i>=3)break;
					hotList.push(parseIndexDataToJSON(hotMovieList[i]));		//精减数据,将数据data的属性转换跟列表list里面data的属性一样,在收藏夹的时候保存一样
				}
				var hotObj = {
					tar:'hot',
					tip:'热播',
					list:hotList,
				}
				list.push(hotObj);
			}
			var newMovieList = indexObj.newMovieList;
			if(newMovieList && newMovieList.length>0){
				var newList = new Array();
				for(var i =0;i<newMovieList.length;i++){
					if(i>=3)break;
					newList.push(parseIndexDataToJSON(newMovieList[i]));
				}
				var hotObj = {
					tar:'hot',
					tip:'最新',
					list:newList,
				}
				list.push(hotObj);
			}
		}catch (e){
			$.log(e.toString());
		}
	}
	
	var recentList = recentDB.getList();			//获取最近观看的数据
	var recentObj = {
		tar:'recent',
		tip:'最近观看',
		list:recentList,
	}
	list.push(recentObj);  $.log($.toJSON(list));
	return list;
}

function parseIndexDataToJSON(program){
	var data = {};
	data.actors = program.actors;
	data.director = program.director;
	data.image = program.logoHighlight; 
	data.region = program.region;
	data.name = program.name;
	data.id = program.id;
	return data;
}